package version.test.util;

import java.util.Calendar;
import java.util.Date;

/**
 * @description:
 * @author: hzw
 * @time: 2024/2/27 9:18
 */
public class MyDateUtil {

    //注意:月份是0-11月
    public static Date getDate(int year, int month, int day, int hour, int minute, int second) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(year, month, day, hour, minute, second);
        return calendar.getTime();
    }

    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(calendar.get(Calendar.YEAR), 12, 1, 6, 0, 0);
        Date date = calendar.getTime();
        boolean afterDate = date.after(Calendar.getInstance().getTime());
        System.out.println(new Date().after(new Date()));
        System.out.println(date);
    }
}
